﻿<%@ Page language="vb" autoeventwireup="false" masterpagefile="~/Admin/Masters/Admin.master" 
    codebehind="FileManager.aspx.vb" inherits="Boogaloo.Admin.UI.Webpages.FileManager" 
    title="Mindfly Web Studio's Boogaloo - Host - File Manager" validaterequest="false" %>
<%@ register tagprefix="boogaloo" assembly="Boogaloo.Admin" namespace="Boogaloo.Admin.UI.Controls" %> 
<script runat="server">
    '
    ' Boogaloo® - http://www.mindfly.com
    ' Copyright (c) 2009
    ' by Mindfly, Inc.
    '
    ' Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated 
    ' documentation files (the "Software"), to deal in the Software without restriction, including without limitation 
    ' the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and 
    ' to permit persons to whom the Software is furnished to do so, subject to the following conditions:
    '
    ' The above copyright notice and this permission notice shall be included in all copies or substantial portions 
    ' of the Software.
    '
    ' THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
    ' INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
    ' DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
    ' SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
    ' SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
    ' WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
    ' THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    
</script>

<asp:content ID="MainContent" contentplaceholderid="MainContent" runat="server">
    
    <h3>File Manager</h3>
    
<div>
	<div class="box revealControl">

		<h4>Existing Files in <asp:literal id="lit_current_dir" runat="server" /></h4>
		<span class="buttonWrap">
			<button type="button" class="button reveal add">+</button>
			<span>Upload another file</span>
		</span>
	</div>
	<div class="reveal panel">
	    
	    <h4>Upload file</h4>
	   	
	   	<asp:label id="lbl_up_file" runat="server" associatedcontrolid="up_file">
	   	<span>File to upload</span> <asp:requiredfieldvalidator id="rfv_up_file" validationgroup="uploadfile" runat="server" controltovalidate="up_file" errormessage=" * required" cssclass="error" />
	   	<asp:fileupload id="up_file" runat="server" cssclass="longest" />
	   	</asp:label>
	    
	    <asp:linkbutton id="lb_upload" text="Upload file" runat="server" validationgroup="uploadfile" cssclass="button" />
	</div>
</div>


<asp:updatepanel id="up" runat="server">
<contenttemplate>

<asp:repeater id="rpt_files" runat="server">
    <headertemplate><ul class="figure list"></headertemplate>
    <itemtemplate><li>
    <asp:hyperlink id="hyp" runat="server" />
    
    <boogaloo:labelhiddentextbox id="lht_filename" onclick="lht_Click" validate="true" validationgroup="editfile" errormessage=" * required" cssclass="inlineEdit" runat="server" />
    
    <ul class="toolbar">
        <li class="tool delete"><boogaloo:commitwizard id="dwiz" runat="server" start_text="Delete" onclick="dwiz_Click" tooltip="Delete this file" message="You are about do delete this file from the server.<br />This action cannot be reversed." /></li>
    </ul>
    
    </li></itemtemplate>
    <footertemplate></ul></footertemplate>
</asp:repeater>

</contenttemplate>
</asp:updatepanel>


</asp:content>


<asp:content id="SubContent" contentplaceholderid="SubContent" runat="server">

<div id="divPageSettings" class="box enriched alt">

    <h3>Upload Directories</h3>
    <asp:label id="lbl_ddl_directory" runat="server" associatedcontrolid="ddl_directory">
    <span>Current directory</span>
    <asp:dropdownlist id="ddl_directory" cssclass="longest" runat="server" />
    </asp:label>

    <asp:updatepanel id="up_dir" runat="server">
    <contenttemplate>
    
<div>
    <div class="box revealControl">
    &nbsp;
    <span class="buttonWrap">
	    <button type="button" class="button reveal add">+</button>
		<span>Add a sub directory</span>
    </span>
    </div>
    <div class="reveal panel">
        <asp:label id="lbl_txt_dir_name" runat="server" associatedcontrolid="txt_dir_name">
        <span>Sub directory name</span> <asp:requiredfieldvalidator id="rfv_txt_dir_name" runat="server" controltovalidate="txt_dir_name" errormessage=" * required" display="Dynamic" validationgroup="newdir" />
        <asp:textbox id="txt_dir_name" cssclass="longest" runat="server" />
    </asp:label>
    <asp:linkbutton id="lb_add_dir" runat="server" cssclass="button" validationgroup="newdir" text="Create Sub Directory" />
    </div>
</div>    

    
    
    
    <boogaloo:commitwizard id="dwiz_dir" runat="server" start_text="Delete Current Directory" tooltip="Delete the current directory" cssclass="button" message="Please confirm you want to delete this directory.<br />This action cannot be reversed." />
    
    </contenttemplate>
    </asp:updatepanel>

    
</div>

</asp:content>